How it works?

Here is a good process demo of buidling a LED counter and a low-end CPLD