Check for occurences of string in other string Challenge

I'm sure you read the title, and came in to farm your rep, thinking its kids' stuff, but think again! You have to challenge each other in the shortest code to count the occurences of a string in another. For example, given the following input: 


  aaaabbbbsssffhd


as a string, and the string 


  s


should output 


  3


Rules

Just before you smile and say, "Hey, I'll use ----," read this:


No use of external libraries, or your language's API. You have to implement it manually. Which means you can't use your language's built-in function or method for counting occurences
No file I/O
No connecting with a server, website, et cetera
In a case of `ababa`, where it starts with `aba` and if you read the last 3 letters it's also `aba`, you only count one*


Thank you @ProgramFOX for that (the last rule)!

*Hint: When you count occurences, you can remove the ones you counted to avoid disobeying this rule

I think the last 2 rules are just for rule benders!

Winning Criterion

As previously stated the winner is the code with the less bytes used. The winner will be announced five days later (15 June 2014)

My Small Answer

Here's my C++ answer, where it assumes that the li variable holds the string to check occurences in, and l is the string to look for in f:

Ungolfed

int c = 0;
while (li.find(lf) != string::npos)
{
    int p = li.find(lf);
    int l = p + lf.length() - 1;
    for (p = p; p &lt;= l; p++)
    {
        li[p] = static_cast&lt;char&gt;(8);
    }
    ++c;
}


Of course, to use std::string, you have to include the string header file!

Golfed

int c=0;while(li.find(lf)!=string::npos){int p=li.find(lf);int l=p+lf.length()-1;for(p=p;p&lt;=l;p++){li[p]=static_cast&lt;char&gt;(8);}++c;}


Result

The variable c is going to be the value of how many times the string was found



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enjoy!

Winner

After a long wait @Dennis answer wins with only 3 bytes, written in GolfScript
JavaScript 32

Nothing really interesting here...

(p=prompt)().split(p()).length-1


split main purpose is to create an array from a string using the delimiter in argument.