Removed some variables to increase readability (with slight cost to performance). Used .count() to increase readability.