implemented "count"