Fix bug in api _transmit exception handling.
Allow count() to take filter keywords.
Make the tests work on Windows.