<?php
header('Content-Type: application/json');
require_once dirname(__FILE__) . '/../../config.php';
$db = getDB();
$stmt = $db->prepare("SELECT COUNT(*) AS cnt FROM transacciones WHERE tipostr_idtipostr = 11 AND fechat BETWEEN '2026-03-01' AND '2026-03-31'");
$stmt->execute();
$r = $stmt->fetch(PDO::FETCH_ASSOC);
echo json_encode(['count' => $r['cnt']]);
