You can download antcount on the SourceForge download page. The binary zip file contains one jar to use in Ant. Save this jar in you filesystem and reference it in your build scripts in the classpath attribute of typedef :
<typedef name="stopfilter"
         classpath="antcount.jar" />
<typedef name="echofilter"
         classpath="antcount.jar" />
<typedef name="countfilter"
         classpath="antcount.jar" />
<typedef name="parallelfilter"
         classpath="antcount.jar" />
There is a property file that can be used in typedef to define all types at once.
<typedef resource="/net/sf/antcount/"
         classpath="antcount.jar" />

Finally, you can also use the provided antlib definition file /net/sf/antcount/antlib.xml.

<typedef resource="/net/sf/antcount/antlib.xml"
         classpath="antcount.jar" />

The classpath attribute is not required if you copied antcount.jar in the lib subdirectory of your ant installation.

You can find more information about typedef in the Ant manual pages