CREATE OR REPLACE PROCEDURE pTest ()
AS
BEGIN
    SELECT COUNT(*) INTO nTest;
      FROM tTest
     WHERE 1 = 1;
    IF nTest = 3 THEN
        INSERT INTO tCount(cTable, nCount) VALUES('tTest', nTest);
    END IF;

    SELECT COUNT(*) INTO nTest
      FROM tTest2
     WHERE 1 = 1;
END;
/

INSERT INTO tTest VALUES('Test1','Test2','Test3');