Added support for currentCost/1. Removed count/1. Added some ASP checks.