Implemented standard error when result type is wrong.
A bunch of header and static stuff.
Added function to header.
Handle memory.
Think I got the count working.
Got count spec working.
Refactored to before/after.