<?php   

include 'conexion.php';
$check_id_act=$_GET['check_id_act'];

if(!empty($check_id_act)){
     $check_id_act = "WHERE id_activo LIKE '%".$check_id_act."%' OR activos.descripcion LIKE '%".$check_id_act."%'";  
}

$consulta = "select COUNT(`id_activo`) as numero_activo FROM activos $check_id_act";
$resultado = $conexion->query($consulta);

while($fila = $resultado -> fetch_array()){
    $id_activo[] = array_map('utf8_encode', $fila);
}

echo json_encode($id_activo, JSON_UNESCAPED_UNICODE);

$resultado -> close();

?>