function c = count(s, varargin)
%COUNT Returns the number of occurrences of a pattern in a string
%   
%   C = COUNT(S,PATTERN)
%   C = COUNT(S,PATTERN,'IgnoreCase',IGNORE)
%   
%   Limitations:
%   Pattern objects are not supported.
%   
%   See also COUNT.
%   


%   Copyright 2016-2020 The MathWorks, Inc.

narginchk(2, 4);
% PATTERN is currently not supported
matlab.bigdata.internal.util.errorIfPatternInput('distributed', s, varargin{:});
c = codistributed.pElementwiseUnaryOp(@count, s, varargin{:});
