Fixed a bug with the counts