As to APM:
"Actions per minute is the number of actions (such as selecting units or issuing an order) completed within a minute of gameplay in real time strategy games, most notably in Starcraft. High APM is often associated with skill, as it can indicate that a player both knows what to do in the game and has the manual dexterity to carry it out. Software has been developed to analyze players' APM in these games. Beginners often have low APM counts, typically below 50. Professional e-athletes in South Korea usually have average APM scores around 300, but often exceed the 400 mark during intense battle sequences. Notable gamers with over 400 average APM include Lee Young-Ho and Lee Jae-Dong. Park Sung-Joon is noted for the record APM of 818."
http://en.wikipedia.org/wiki/Actions_per_minute
APM trivia: there was a brief moment in-between two patches in Heroes of Newerth - a popular DoTA clone - in where moving your "hero" to a new location on the map counted as an action. Players simply stepping around rapidly right where they were standing would increase their APM indefinitely.
I believe technically this would be considered APM in all games. In starcraft 1+2 even selecting a control group is considered an action, so simply hiting 1 2 3 4 5 in succession without building units or changing rallies or really doing anything would count as 5 actions.
eAPM, or effective APM is a more advanced attempt to filter out spammy actions (as you describe) and was made up a bit after APM first came out as a statistic and people started gaming the APM stat to try and inflate their egos.
In SC2 there is a bug on the live patch where the APM tab in replays or live games shows the eAPM stat, and the eAPM tab shows the APM stat due to some silly mixup that made it past QA.