Dear Jawad,
-) Global Counters: Let's look at an order format "O-[year]-#", which produces numbers like: O-2016-1, O-2016-2, O-2016-3, etc.
A global counter will simply increase every time a new number is generated, i.e. when 2017 comes, the numbers go like: O-2016-134, O-2016-135, O-2017-136, O-2017-137, etc. So, in 2017 the number does not reset for global counters.
Format-specific counters, on the other hand start from 1 when any of the variables in the format changes. In our case, there is one counter for 2016 (O-2016-#) and for 2017 the plugin uses a new counter (O-2017-#), which starts from 1.
2) Custom variables can be used e.g. to use a completely different format if a certain product or category is bought. Other uses are to include the country name/shortcode, but combine several countries to one shortcode (like, all EU-countries should have "EU" in the number).
To use a different format when a certain category is bought, you can add a custom variable definition:
if Categories contain "categoryA" => Set variable "ordernumber_format" to "Nr-[year]-[month]-SPECIAL-#"
Or you can define your own variable, e.g. to distinguish orders above 150€ and below 150€ (since there are different legal requirements, you might want to have different numbering schemes for small and large orders):
Number format: O-[year]-[smalllarge]-#
Custom variables
If Amount >= 150 then set variable "smallarge" to "LARGE"
If Amount < 150 then set variable "smallarge" to "SMALL"
Best regards,
Reinhold