<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hrwikitwice.com/index.php?action=history&amp;feed=atom&amp;title=HRWiki%3ACounter</id>
	<title>HRWiki:Counter - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hrwikitwice.com/index.php?action=history&amp;feed=atom&amp;title=HRWiki%3ACounter"/>
	<link rel="alternate" type="text/html" href="https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;action=history"/>
	<updated>2026-07-21T10:12:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;diff=30609&amp;oldid=prev</id>
		<title>imported&gt;HRWikiMirrorBot: Reimported from hrwiki.org Wayback HTML→wikitext (full reconvert)</title>
		<link rel="alternate" type="text/html" href="https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;diff=30609&amp;oldid=prev"/>
		<updated>2026-07-18T21:00:57Z</updated>

		<summary type="html">&lt;p&gt;Reimported from hrwiki.org Wayback HTML→wikitext (full reconvert)&lt;/p&gt;
&lt;a href=&quot;https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;amp;diff=30609&amp;amp;oldid=17263&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>imported&gt;HRWikiMirrorBot</name></author>
	</entry>
	<entry>
		<id>https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;diff=17263&amp;oldid=prev</id>
		<title>imported&gt;HRWikiMirrorBot: Reimported from hrwiki.org Wayback HTML→wikitext (full reconvert)</title>
		<link rel="alternate" type="text/html" href="https://hrwikitwice.com/index.php?title=HRWiki:Counter&amp;diff=17263&amp;oldid=prev"/>
		<updated>2026-07-18T17:00:33Z</updated>

		<summary type="html">&lt;p&gt;Reimported from hrwiki.org Wayback HTML→wikitext (full reconvert)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Mirrored from Homestar Runner Wiki (hrwiki.org) via Wayback Machine --&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;amp;#124;&amp;#039;&amp;#039;increment&amp;#039;&amp;#039;}}&lt;br /&gt;
| Increments the counter &amp;#039;&amp;#039;id&amp;#039;&amp;#039; by &amp;#039;&amp;#039;increment&amp;#039;&amp;#039; and displays the result; &amp;#039;&amp;#039;increment&amp;#039;&amp;#039; can be omitted, and defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| {{#resetcount:&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;amp;#124;&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&amp;amp;#124;&amp;#039;&amp;#039;increment&amp;#039;&amp;#039;}}&lt;br /&gt;
| Silently sets the counter &amp;#039;&amp;#039;id&amp;#039;&amp;#039; to &amp;#039;&amp;#039;value&amp;#039;&amp;#039; minus &amp;#039;&amp;#039;increment&amp;#039;&amp;#039; (so that the next count by &amp;#039;&amp;#039;increment&amp;#039;&amp;#039; will display &amp;#039;&amp;#039;value&amp;#039;&amp;#039;); &amp;#039;&amp;#039;value&amp;#039;&amp;#039; and &amp;#039;&amp;#039;increment&amp;#039;&amp;#039; can be omitted, and both default to 1.&lt;br /&gt;
|-&lt;br /&gt;
| {{[[Template:hcount|hcount]]}}&amp;lt;br /&amp;gt;{{[[Template:vcount|vcount]]}}&lt;br /&gt;
| Used in [[HRWiki:SORT|sortable tables]].  &amp;#039;&amp;#039;See [#Sortable_Tables below].&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;count&amp;#039;&amp;#039;&amp;#039; is a [[Help:Parser function|parser function]] that returns an integer that increments each time the function is called:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The counters can be given different names, so you can have more than one of them on the same page:&amp;lt;br /&amp;gt;&lt;br /&gt;
(The actual name doesn&amp;#039;t matter, so long as they&amp;#039;re different. If you use a counter in a template, pick a name that&amp;#039;ll be unique.)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:first}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:second}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:second}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:second}}&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:first}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:second}}&lt;br /&gt;
| 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also make the counter count by twos, or by any other number:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:evens&amp;amp;#124;2}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:evens&amp;amp;#124;2}}&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:evens&amp;amp;#124;2}}&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:evens&amp;amp;#124;2}}&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:evens&amp;amp;#124;2}}&lt;br /&gt;
| 10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Different increments can be used at different times, depending on what is needed:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;1}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;1}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;3}}&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;0}}&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;-1}}&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:strange&amp;amp;#124;2}}&lt;br /&gt;
| 6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The counter can be reset partway through a page:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| {{#resetcount:basic}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:basic}}&lt;br /&gt;
| 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also set what number you want to start on:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#resetcount:starting&amp;amp;#124;11}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting}}&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting}}&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting}}&lt;br /&gt;
| 13&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting}}&lt;br /&gt;
| 14&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting}}&lt;br /&gt;
| 15&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re using an increment, you need to give it to #resetcount too:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#resetcount:starting evens&amp;amp;#124;14&amp;amp;#124;2}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting evens&amp;amp;#124;2}}&lt;br /&gt;
| 14&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting evens&amp;amp;#124;2}}&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting evens&amp;amp;#124;2}}&lt;br /&gt;
| 18&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting evens&amp;amp;#124;2}}&lt;br /&gt;
| 20&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:starting evens&amp;amp;#124;2}}&lt;br /&gt;
| 22&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Use a negative increment to count down. As noted above, be sure to pass the increment to #resetcount too:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#resetcount:countdown&amp;amp;#124;3&amp;amp;#124;-1}}&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{#count:countdown&amp;amp;#124;-1}}&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:countdown&amp;amp;#124;-1}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:countdown&amp;amp;#124;-1}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:countdown&amp;amp;#124;-1}}&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| {{#count:countdown&amp;amp;#124;-1}}&lt;br /&gt;
| -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can use the counter in other [[ParserFunctions|parser functions]]:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#ifexpr:{{#count:alternate}} mod 2 = 0&amp;amp;#124;even&amp;amp;#124;odd}}&lt;br /&gt;
| odd&lt;br /&gt;
|-&lt;br /&gt;
| {{#ifexpr:{{#count:alternate}} mod 2 = 0&amp;amp;#124;even&amp;amp;#124;odd}}&lt;br /&gt;
| even&lt;br /&gt;
|-&lt;br /&gt;
| {{#ifexpr:{{#count:alternate}} mod 2 = 0&amp;amp;#124;even&amp;amp;#124;odd}}&lt;br /&gt;
| odd&lt;br /&gt;
|-&lt;br /&gt;
| {{#ifexpr:{{#count:alternate}} mod 2 = 0&amp;amp;#124;even&amp;amp;#124;odd}}&lt;br /&gt;
| even&lt;br /&gt;
|-&lt;br /&gt;
| {{#ifexpr:{{#count:alternate}} mod 2 = 0&amp;amp;#124;even&amp;amp;#124;odd}}&lt;br /&gt;
| odd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code&lt;br /&gt;
! Gives&lt;br /&gt;
|-&lt;br /&gt;
| {{#expr:{{#count:squares}} * {{#count:squares&amp;amp;#124;0}}}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| {{#expr:{{#count:squares}} * {{#count:squares&amp;amp;#124;0}}}}&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| {{#expr:{{#count:squares}} * {{#count:squares&amp;amp;#124;0}}}}&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| {{#expr:{{#count:squares}} * {{#count:squares&amp;amp;#124;0}}}}&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| {{#expr:{{#count:squares}} * {{#count:squares&amp;amp;#124;0}}}}&lt;br /&gt;
| 25&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sortable Tables ==&lt;br /&gt;
&lt;br /&gt;
When using count in [[HRWiki:SORT|sortable tables]], please use the {{[[Template:hcount|hcount]]}} and {{[[Template:vcount|vcount]]}} templates. Be sure to carefully read their documentation in order to sort table entries correctly.&lt;br /&gt;
[[Category:Help]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;HRWikiMirrorBot</name></author>
	</entry>
</feed>