Jetpack_Media_Summary::get_link_count PHP Method

    static function get_link_count($post_content)
    {
        return preg_match_all('/\\<a[\\> ]/', $post_content, $matches);
    }

Usage Example

 /**
  * @author scotchfield
  * @covers Jetpack_Media_Summary::get_link_count
  * @since 3.2
  */
 public function test_mediasummary_get_link_count_invalid_tag()
 {
     $content = '<abbr title="Canada">CA</abbr>';
     $this->assertEquals(0, Jetpack_Media_Summary::get_link_count($content));
 }