use count instead of foldl