function checkCount(oOpa, iExpectedCount, sTitleId, iExpectedOverallCount) {
		oOpa.waitFor({
			id : sTitleId,
			success : function (oTitle) {
				Opa5.assert.strictEqual(
					// extract number from title
					Number(oTitle.getText().split(" ")[0]),
					iExpectedCount,
					"Expected count for " + sTitleId + ": " + iExpectedCount);
				if (iExpectedOverallCount !== undefined) {
					Opa5.assert.strictEqual(
						// extract number from title "... (xyz overall)"
						Number(oTitle.getText().split("(")[1].split(" ")[0]),
						iExpectedOverallCount,
						"Expected overall count for " + sTitleId + ": " + iExpectedOverallCount);
				}
			},
			viewName : sViewName
		});
	}
/*
	 * Search for the control with the given ID, extract the number and compare with the expected
	 * count and optional expected overall count.
	 */
Search for the control with the given ID, extract the number and compare with the expected
count and optional expected overall count.
Search for the control with the given ID extract the number and compare with the expected count and optional expected overall count .
function checkCount(oOpa, iExpectedCount, sTitleId, iExpectedOverallCount) {
		oOpa.waitFor({
			id : sTitleId,
			success : function (oTitle) {
				Opa5.assert.strictEqual(
					Number(oTitle.getText().split(" ")[0]),
					iExpectedCount,
					"Expected count for " + sTitleId + ": " + iExpectedCount);
				if (iExpectedOverallCount !== undefined) {
					Opa5.assert.strictEqual(
						 "... (xyz overall)"
						Number(oTitle.getText().split("(")[1].split(" ")[0]),
						iExpectedOverallCount,
						"Expected overall count for " + sTitleId + ": " + iExpectedOverallCount);
				}
			},
			viewName : sViewName
		});
	}
function checkCount ( oOpa , iExpectedCount , sTitleId , iExpectedOverallCount ) { oOpa . waitFor ( { id : sTitleId , success : function ( oTitle ) { Opa5 . assert . strictEqual ( Number ( oTitle . getText ( ) . split ( " " ) [ 0 ] ) , iExpectedCount , "Expected count for " + sTitleId + ": " + iExpectedCount ) ; if ( iExpectedOverallCount !== undefined ) { Opa5 . assert . strictEqual ( Number ( oTitle . getText ( ) . split ( "(" ) [ 1 ] . split ( " " ) [ 0 ] ) , iExpectedOverallCount , "Expected overall count for " + sTitleId + ": " + iExpectedOverallCount ) ; } } , viewName : sViewName } ) ; }
Search for the control with the given ID, extract the number and compare with the expected
 count and optional expected overall count.
Search for the control with the given ID extract the number and compare with the expected count and optional expected overall count .
// extract number from title // extract number from title "... (xyz overall)"