As an aid memoir; Firstly, to create stored procedures in MySQL you need to temporarily change the line delimiter so you can add code with normal delimiters without delimiting what you're currently doing.
Secondly, in order to use variables passed into a procedure you need to concatenate into a statement, you can't just "select * from myPassedVariableName".
The example below will count() the id column of any given table