Count fixed to work with tuples