
The count statement is used to increment a counter after every "go" statement. By default the initial value of the counter is zero, there is no final value, and the increment is 1. The count statement is a declaration and is not executable. The format of the count statement is given below.
count <net or variable name>
The count statement may be supplied with from 1 to 3 operands in addition to the net or variable name.. If one operand is supplied, it is assumed to be the inital value of the counter. If two operands are supplied, they are assumed to be the initial value of the counter followed by the increment. If three operands are supplied they are assumed to be the initial value followed by the final value followed by the increment. When a final value is supplied, and the value of the counter exceeds the final value, its value will be set back to its inital value. Otherwise a counter is incremented without bound.