Count the number of devices with each name
Fix identation (2 spaces)