My aim is to trigger counting when ever I want and as often as I want with the void loop running.
One way to do this is to use a boolean variable to control whether counting is taking place. Set it to true when you want to count and false when you don't. This allows you to count only when you want to.
What sets the boolean to true to start counting is up to you. It could, for instance, be a button press, an external signal, the output of a sensor or time to name a few.