Weird. Are you sure you gave it the right parameter oid (not name) for getParam? Here is a very minimal panel where that code works for me (I've also attached it):
<abs contexttype="opengear" id="_top" style="">
<meta>
<params>
<param access="1" maxlength="0" name="myArray" oid="myArray" precision="0" type="STRING_ARRAY" widget="default">
<value>one</value>
<value>two</value>
<value>three</value>
<value>four</value>
<value>five</value>
<value>six</value>
</param>
</params>
</meta>
<param expand="true" height="482" left="89" oid="myArray" showlabel="false" top="46" width="264"/>
<button buttontype="push" height="83" left="592" top="156" width="286">
<task tasktype="ogscript">var p = params.getParam("myArray",0);
ogscript.debug(p.getElementCount());</task>
</button>
<button buttontype="push" left="502" top="401"/>
</abs>
When I click on the button, it prints "6" which, is the number of elements in the array.
If this still does not work for you, post your parameter definition and the task code, and I can help you debug it a bit.
ArrayCount.grid
#DashBoard