$i = $i + 1; ?
or
$new_id = $last_id ++; ?
If you are working with a MySQL database then you will setup the field e.g. user_id to auto increment. If you need to do it for something else in your code, then just use plain php as above. I do not think there is a specific function in Phalcon to do this.