changed 'dimensions' variable to 'count'