PHPackages                             spaf/count-y - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. spaf/count-y

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spaf/count-y
============

Simple web-site visits counter lib

2.0.2(3y ago)19GPL-3.0-or-laterPHPPHP &gt;=8.0

Since Jul 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/PandaHugMonster/count-y)[ Packagist](https://packagist.org/packages/spaf/count-y)[ RSS](/packages/spaf-count-y/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

count-y
=======

[](#count-y)

Simple PHP Counter

Version: **2.0.2**

To install
----------

[](#to-install)

1. Go to the folder of the project (git/code repo) `/home/user/my-code`
2. Run commands in terminal in your code folder:

```
    composer require spaf/count-y;
```

Basic usage (file-based)
------------------------

[](#basic-usage-file-based)

```
require __DIR__.'/vendor/autoload.php';

use spaf\county\Counter;
use spaf\county\storage\StorageFile;
use spaf\simputils\PHP;

PHP::init();

$c = new Counter(new StorageFile());
//  In case if the StorageFile is not specified, the value will be stored in memory (StorageMemory
//  class). So it will exist until end of the runtime/execution.
//$c = new Counter();

//  If you need events, first delegate/closure is an event function, the second - event condition. The first will work,
//  only if the second will return TRUE, or if condition delegate/closure is not specified.

//$c->add_event('My first test event', function ($value, $name) {
//	echo "EVENT of {$name} for value of {$value}\n";
//}, fn($v) => $v % 10 == 0 );

for ($i = 0; $i visit();
	$c->visit();
	$c->visit();
}

echo "Test: {$c}";
```

That's it. The lib right now supports really minimal functionality.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~86 days

Total

6

Last Release

1432d ago

Major Versions

1.0.2 → 2.0.02022-01-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/190b21a93ede3e922f186b86be10c9df60ff807d7ba95b7a1a6095414dd3d557?d=identicon)[PandaHugMonster](/maintainers/PandaHugMonster)

---

Top Contributors

[![PandaHugMonster](https://avatars.githubusercontent.com/u/5005505?v=4)](https://github.com/PandaHugMonster "PandaHugMonster (14 commits)")

---

Tags

phplibrarycountervisitsvisits countsimple counter

### Embed Badge

![Health badge](/badges/spaf-count-y/health.svg)

```
[![Health](https://phpackages.com/badges/spaf-count-y/health.svg)](https://phpackages.com/packages/spaf-count-y)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

70036.3M116](/packages/league-iso3166)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
