Replaced length with count