$page->increment($field, $by = 1, $max = null)
- since: Kirby 2.3.0
A field name
An integer by which to increment
The max number
<?php $page->increment('likes') ?>
The increment method will only work reliably with field values that PHP can parse into a valid integer. Otherwise the field value will be evaluated as zero and incremented to 1 or whatever $by value you pass.