$form_id = 5;
$entries_left_message = 'Only %s positions left!';
$form = RGFormsModel::get_form_meta($form_id);
$entry_count = RGFormsModel::get_lead_count($form['id'], '');
$entries_left = $form["limitEntriesCount"] - $entry_count;
printf($entries_left_message, $entries_left);