Updated count example so that it only applies to ruby < 2.0