#include <iostream>
#include <string>

int CountChar( std::string text, std::string text_char ) {
	int res = 0;
	for( size_t p = 0; ( p = text.find( text_char, p ) ) != std::string::npos; ++res )
	   p += text_char.length();
	return res;
}
   
int main() {
   std::cout << CountChar("Hello_|_Poppy_|_", "_|_") << std::endl;
}
